package org.sparkle.web.session;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.sparkle.db.basic.ServiceManager;

public class SessionListener implements HttpSessionListener {

	@Override
	public void sessionCreated(HttpSessionEvent arg0) {
		arg0.getSession().setAttribute("SERVICE_MANAGER", new ServiceManager());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent arg0) {
		arg0.getSession().removeAttribute("SERVICE_MANAGER");
	}

}
